﻿using System;
using Sharpimeter.Model;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.IO;

namespace UnitTestSharpimeter
{
    [TestClass]
    public class UnitTestConfiguration
    {
        private Config config = new Config();

        [TestMethod]
        public void TestConfigurationMacAddress()
        {
            Assert.AreEqual("001C050046AC", config.GetMacAddress());
        }

        [TestMethod]
        public void TestConfigurationPincode()
        {
            Assert.AreEqual("199646", config.GetPincode());
        }

        [TestMethod]
        public void TestConfigurationDatabaseAddress()
        {
            Assert.AreEqual("213.180.89.116", config.GetDatabaseAddress());
        }

        [TestMethod]
        public void TestConfigurationDatabaseUser()
        {
            Assert.AreEqual("ht13", config.GetDatabaseUsername());
        }

        [TestMethod]
        public void TestConfigurationDatabasePassword()
        {
            Assert.AreEqual("projekt", config.GetDatabasePassword());
        }

        [TestMethod]
        public void TestConfigurationDatabaseDatabase()
        {
            Assert.AreEqual("ht13", config.GetDatabaseName());
        }

        [TestMethod]
        public void TestConfigurationPatientID()
        {
            Assert.AreEqual("1", config.GetPatientID());
        }

        [TestMethod]
        public void TestConfigurationFileExist()
        {
            Assert.IsTrue(File.Exists("config.xml"));
        }

    }
}
